﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;

namespace SiloManaging
{
    public partial class frmMain : Form
    {
        Database _Database = new Database();
        frmIngredient _frmIngredeint;
        public frmMain()
        {
            InitializeComponent();
            _Database.DataSource = Application.StartupPath + @"Database\SiloInventory.mdb";
            
        }

        private void btnIngredient_Click(object sender, EventArgs e)
        {            
            _frmIngredeint = new frmIngredient();
            _frmIngredeint.Show();
            this.Hide();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {

        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _Database.CloseConnection();
            this.Close();
        Application.Exit();}
    }
}
